<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8" />
    <title>浮动布局</title>
    <style>
      .header {
        /* width: auto; */
        height: 48px;
        background-color: blueviolet;
      }
      .main-left {
        width: 100px;
        height: calc(100vh - 88px);
        background-color: coral;
        float: left;
      }
      .main-middle {
        width: calc(100% - 300px);
        height: calc(100vh - 88px);
        background-color: teal;
        float: left;
      }
      .main-right {
        width: 200px;
        height: calc(100vh - 88px);
        background-color: green;
        float: left;
      }
      .footer {
        /* width: 100px; */
        height: 40px;
        background-color: gold;
      }
      .main {
        /* display: flow-root; */
      }
      .main::after {
        content: "";
        display: block;
        clear: both;
      }
      body {
        margin: 0;
      }
    </style>
  </head>
  <body>
    <div class="header"></div>
    <div class="main">
      <div class="main-left"></div>
      <div class="main-middle"></div>
      <div class="main-right"></div>
    </div>
    <div class="footer"></div>
  </body>
</html>
